﻿<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.evolutility.com" title="材料入库" icon="cube.gif" description="ExportOrImport">
  <data dbtable="MRP_ImportExport" splogin="asp.net membership" dbcolumnpk="ID" dbwhere="T.status!=9 and T.ExportOrImport=1 and Exists(Select * from MRP_MaterialMain where MRP_MaterialMain.ID=T.MaterialID and MRP_MaterialMain.MType>5)" sppaging="EvoSP_PagedItem @SQLselect, @SQLtable, @SQLfrom, @SQLwhere, @SQLorderby, @SQLpk, @pageid, @pagesize" />
  <panel userid="1" ppos="1" label="收货登记" width="100">
     <field id="155" type="lov" typeid="5" label="采购订单号" dbcolumn="OrderID" dependency ="MaterialID" dbcolumnread="Purchase_OrderNo"
   dbtablelov="MRP_Purchase" dbcolumnreadlov="OrderNo" dbwherelovinsert="MRP_Purchase.Status='2'" maxlength="0" readonly="2" required="1" optional="" fpos="30" search="1" searchadv="1" searchlist="1" height="1" width="30" />
   <field id="153"  type="lov" typeid="5" label="材料名称" dbcolumn="MaterialID" jsdependency ="MyMRP.change_MaterialImportFields" dbcolumnread="NameAndCode" dbcolumnreadlov="NameAndCode" dbtablelov="View_MaterialNameAndCode" maxlength="2" readonly="2" required="1" optional="" fpos="20" search="1" searchadv="1" searchlist="1" height="1" width="70" />
    <field id="38" type="formula" typeid="5" label="尚未送达数量" dbcolumn="Select [RemainImportQuantity] FROM View_GetRemainImportQuantity where [View_GetRemainImportQuantity].[OrderID]=T.OrderID and [View_GetRemainImportQuantity].[MaterialID]=T.MaterialID" dbcolumnread="RemainImportQuantity"
maxlength="0" readonly="1" required="" optional="" fpos="30" search="0" searchadv="1" searchlist="0" height="1" width="20" />
    <field id="154" type="decimal" typeid="10" label="数量" dbcolumn="Quantity" jsvalidation="MyMRP.check_MaterialImportQuantity" dbcolumnread="Quantity" maxlength="8" readonly="0" required="1" optional="" fpos="20" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="38" type="formula" typeid="5" label="单位" dbcolumn="Select top 1 [DisplayText] FROM MRP_PurchaseDetail inner join View_UnitType_List on PurchaseUnit=View_UnitType_List.ID where MRP_PurchaseDetail.[OrderID]=T.OrderID and MRP_PurchaseDetail.[MaterialID]=T.MaterialID" dbcolumnread="PurchaseUnit1"
   maxlength="0" readonly="1" required="" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="38" type="formula" typeid="5" label="单位长度" dbcolumn="Select top 1 [ConversionRatio] FROM MRP_PurchaseDetail where MRP_PurchaseDetail.[OrderID]=T.OrderID and MRP_PurchaseDetail.[MaterialID]=T.MaterialID" dbcolumnread="ConversionRatio"
   maxlength="0" readonly="1" required="" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="154" type="decimal" typeid="10" label="实称重量" dbcolumn="Weight" dbcolumnread="Weight" defaultvalue="0" maxlength="8" readonly="0" required="1" optional="" fpos="20" search="1" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="158" type="date" typeid="17" label="录入时间" defaultvalue="_now" format="{0:d}" dbcolumn="CreatedDate" dbcolumnread="CreatedDate" maxlength="4" readonly="2" required="2" optional="" fpos="60" search="1" searchadv="1" searchlist="" height="1" width="30" />
    <field id="155" type="lov" typeid="5" label="操作" dbcolumn="ExportOrImport" dbcolumnread="DisplayText"
       dbtablelov="View_ExportOrImport_List" dbcolumnreadlov="DisplayText" defaultvalue="1" maxlength="0" readonly="1" required="1" optional="" fpos="30" search="0" searchadv="1" searchlist="0" height="1" width="20" />
    <field id="156" type="textmultiline" typeid="6" label="备注" dbcolumn="Note" dbcolumnread="Note" maxlength="256" readonly="0" required="" optional="" fpos="40" search="1" searchadv="1" searchlist="1" height="3" width="100" />
  </panel>
</form>

